home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gdevht.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  1.8 KB  |  47 lines

  1. /* Copyright (C) 1995, 1998 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gdevht.h,v 1.2 2000/09/19 19:00:13 lpd Exp $ */
  20. /* Halftoning "device" definitions */
  21. /* Requires gxdevice.h */
  22.  
  23. #ifndef gdevht_INCLUDED
  24. #  define gdevht_INCLUDED
  25.  
  26. #include "gzht.h"
  27.  
  28. /*
  29.  * A halftoning device converts between a non-halftoned device color space
  30.  * (e.g., 8-bit gray) and a halftoned space (e.g., 1-bit black and white).
  31.  * We represent colors by packing the two colors being halftoned and the
  32.  * halftone level into a gx_color_index.
  33.  */
  34. typedef struct gx_device_ht_s {
  35.     gx_device_forward_common;
  36.     /* Following + target are set before opening. */
  37.     const gx_device_halftone *dev_ht;
  38.     gs_int_point ht_phase;    /* halftone phase from gstate */
  39.     /* Following are computed when device is opened. */
  40.     int color_shift;        /* # of bits of color */
  41.     int level_shift;        /* = color_shift * 2 */
  42.     gx_color_index color_mask;    /* (1 << color_shift) - 1 */
  43.     gs_int_point phase;        /* halftone tile offset */
  44. } gx_device_ht;
  45.  
  46. #endif /* gdevht_INCLUDED */
  47.